import router from './router/index'
import getPageTitle from './unit/get-page-title'
import NProgress from 'nprogress'
import 'nprogress/nprogress.css'
NProgress.configure({ showSpinner: true }) // NProgress 设置
router.beforeEach(async(to, from, next) => {
  NProgress.start()
  document.title = getPageTitle(to.meta.title)
  next()
  NProgress.done()
})
